﻿using System;
using System.Linq;

using Fuse8.DomainFramework.Domain;
using Fuse8.DomainFramework.CacheService;

namespace Fuse8.DomainFramework.DataAccess.StubDatabase
{
    /// <summary>
    /// Used for domain entities which aren't stored in any database
    /// </summary>
    /// <typeparam name="TEntity"></typeparam>
    /// <typeparam name="TKey"></typeparam>
    public class StubEntityDataRepository<TEntity, TKey> : BaseEntityDataRepository<TEntity, TKey, TEntity>, IEntityDataRepository<TEntity, TKey>
        where TEntity : class, IEntityObject<TKey>
        where TKey : IComparable<TKey>, IEquatable<TKey>
    {
        #region BaseEntityDataRepository methods

        /// <summary>
        /// 
        /// </summary>
        public override DataRepositoryCacheOptions CacheOptions
        {
            get
            {
                return DataRepositoryCacheOptions.FullCache;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="repositoryEntity"></param>
        protected override void AddToRepository(TEntity repositoryEntity)
        { }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="repositoryEntity"></param>
        protected override void SaveToRepository(TEntity repositoryEntity)
        { }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="repositoryEntity"></param>
        protected override void DeleteFromRepository(TEntity repositoryEntity)
        { }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="id"></param>
        protected override void DeleteFromRepository(TKey id)
        { }

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        protected override IQueryable<TEntity> AsQueryable()
        {
            return null;
        }

        #endregion
    }
}
